























inkbox-1.7-n905b: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x2,140,10), end-CHS (0x4,247,51), startsector 40959, 38913 sectors; partition 2 : ID=0x83, start-CHS (0x6,127,58), end-CHS (0x46,61,55), startsector 104448, 1024000 sectors; partition 3 : ID=0x83, start-CHS (0x46,61,56), end-CHS (0x56,142,56), startsector 1128448, 262144 sectors; partition 4 : ID=0x83, start-CHS (0x56,142,57), end-CHS (0x1d5,242,17), startsector 1390592, 6159156 sectors


include/configs for U-Bootimx_v7_defconfig



include/configs for U-Boot 






% ls | grep mx6ull
mx6ull_14x14_ddr3_arm2_defconfig
mx6ull_14x14_ddr3_arm2_emmc_defconfig
mx6ull_14x14_ddr3_arm2_epdc_defconfig
mx6ull_14x14_ddr3_arm2_nand_defconfig
mx6ull_14x14_ddr3_arm2_qspi1_defconfig
mx6ull_14x14_ddr3_arm2_spinor_defconfig
mx6ull_14x14_ddr3_arm2_tsc_defconfig
mx6ull_14x14_evk_defconfig
mx6ull_14x14_evk_emmc_defconfig
mx6ull_14x14_evk_nand_defconfig
mx6ull_14x14_evk_qspi1_defconfig
mx6ull_9x9_evk_defconfig
mx6ull_9x9_evk_qspi1_defconfig
mx6ull_ntx_lpddr2_256m_defconfig
mx6ull_ntx_lpddr2_256m_mfg_defconfig
mx6ull_ntx_lpddr2_512m_defconfig
mx6ull_ntx_lpddr3_512m_defconfig
mx6ull_ntx_lpddr3_512m_mfg_defconfig

mx6ull_ntx_lpddr2_256m_defconfig
mx6ull_ntx_lpddr2_256m_mfg_defconfig





mx6ull_ntx_lpddr2_256m_defconfig









u-boot.binmake -j6 CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm








arm-nickel-linux-gnueabihf-
If it doesn't work, try armv7l-linux-musleabihf-






dd if=u-boot.bin of=/dev/mmcblk0 bs=1K seek=1 skip=1

dd if=u-boot.bin of=/dev/mmcblk0 bs=1K seek=1 skip=1 if [ `echo $UBOOT | grep -c imx` == 1 ]; then
dd if=$UBOOT of=/dev/$DEVICE bs=1K seek=1
else
dd if=$UBOOT of=/dev/$DEVICE bs=1K seek=1 skip=1



fdisk -l on your device?



























go <memory address>

download_mode command in your U-Boot?

uuu to download U-Boot



uuu u-boot.imx



download_mode command in U-Boot, then you could enter this:
eBR-1A # mw 20d8040 30
eBR-1A # mw 20d8044 10000000
eBR-1A # reset
But I suggest you wait a bit; @andi might have some warnings since it's a different platform

u-boot.imx file and load it in IMX USB device plugged in, then start it" (edited)

download_mode command in U-Boot, then you could enter this:
eBR-1A # mw 20d8040 30
eBR-1A # mw 20d8044 10000000
eBR-1A # reset
But I suggest you wait a bit; @andi might have some warnings since it's a different platform 
download_mode without the actual command



u-boot.imx file and load it in IMX USB device plugged in, then start it" (edited)
reset in U-Boot)

download_mode command, you can try that

download_mode command in U-Boot, then you could enter this:
eBR-1A # mw 20d8040 30
eBR-1A # mw 20d8044 10000000
eBR-1A # reset
But I suggest you wait a bit; @andi might have some warnings since it's a different platform 










go 0x80800000, assuming it's the address where it put the U-Boot






upgrade/0x17800000 maybe instead

mw commands above
Or just flash U-Boot to the MMC with skip=1


ums 0 mmc 0















dd if=u-boot.bin of=/dev/mmcblk0 bs=1K seek=1 skip=1?

dd if=u-boot.bin of=/dev/mmcblk0 bs=1K seek=1 skip=1? 

















































extload command


upgrade/mx6ull-ntx/u-boot-mx6ull-E60U20-LPDDR2-256MB.imxdd if=u-boot-mx6ull-E60U20-LPDDR2-256MB.imx of=/dev/mmcblk0 bs=1K seek=1 skip=1






















download_mode command in U-Boot, then you could enter this:
eBR-1A # mw 20d8040 30
eBR-1A # mw 20d8044 10000000
eBR-1A # reset
But I suggest you wait a bit; @andi might have some warnings since it's a different platform 




































armv7l-linux-musleabihf?





arm-nickel-linux-gnueabihf?










RTL871X gives it away



























git pull the kernel repoenv GITDIR=/home/build/inkbox/kernel TOOLCHAINDIR=/home/build/inkbox/kernel/toolchain/arm-nickel-linux-gnueabihf/ THREADS=16 TARGET=arm-nickel-linux-gnueabihf scripts/build_kernel.sh n306 root/home/build/inkbox/kernel















env GITDIR=/home/build/inkbox/kernel TOOLCHAINDIR=/home/build/inkbox/kernel/toolchain/arm-nickel-linux-gnueabihf/ THREADS=16 TARGET=arm-nickel-linux-gnueabihf scripts/build_kernel.sh n306 root kernel/out/n306/zImage-root
Try it and report back if it boots

dd if=zImage-root of=/dev/mmcblk0 bs=512 seek=2048












mx6ull_ntx_lpddr2_256m_defconfig so that U-Boot config worked?




mx6ull_ntx_lpddr2_256m_defconfig so that U-Boot config worked? 




--no-cache option of apk to install packages though, otherwise it won't work


--no-cache option of apk to install packages though, otherwise it won't work 





--no-cache option of apk to install packages though, otherwise it won't work 

















ifsctl mnt rootfs rw and you're good to go















git pull and compile U-Boot in bootloader/mx6ull-n306/

ntx_comm.c




Disk /dev/nbd0: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x25c915c4
Device Boot Start End Sectors Size Id Type
/dev/nbd0p1 49152 79871 30720 15M 83 Linux
/dev/nbd0p2 104448 1128447 1024000 500M 83 Linux
/dev/nbd0p3 1128448 1390591 262144 128M 83 Linux
/dev/nbd0p4 1390592 8388607 6998016 3.3G 83 Linux (edited)49152, right?)

ums 0 mmc 0 from U-Boot if you want

o






















env GITDIR="${PWD}" ./release.sh
rootfs.squashfs


[root@ArchSzybet rootfs]# env GITDIR="${PWD}" ./release.sh
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on ../rootfs.squashfs, block size 1048576.
[============================================================================\] 6979/6979 100%
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 1048576
compressed data, compressed metadata, compressed fragments,
compressed xattrs, compressed ids
duplicates are removed
Filesystem size 73621.37 Kbytes (71.90 Mbytes)
34.22% of uncompressed filesystem size (215152.91 Kbytes)
Inode table size 74379 bytes (72.64 Kbytes)
25.76% of uncompressed inode table size (288710 bytes)
Directory table size 79735 bytes (77.87 Kbytes)
46.50% of uncompressed directory table size (171486 bytes)
Number of duplicate files found 666
Number of inodes 8427
Number of files 6899
Number of fragments 131
Number of symbolic links 904
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 624
Number of ids (unique uids + gids) 2
Number of uids 2
root (0)
szybet (1002)
Number of gids 2
root (0)
szybet (1002)
Root filesystem has been compressed. (edited)
ls ../rootfs.squashfs?


rootfs.squashfs 









openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -out public.pem -outform PEM -pubout
Then
tar cJvf ../keys-n306.tar.xz .
And send me keys-n306.tar.xz via PM (edited)

openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -out public.pem -outform PEM -pubout
Then
tar cJvf ../keys-n306.tar.xz .
And send me keys-n306.tar.xz via PM (edited)




















openssl dgst -sha256 -sign private.pem -out rootfs.squashfs.dgst rootfs.squashfs

openssl dgst -sha256 -sign private.pem -out rootfs.squashfs.dgst rootfs.squashfs 
























mkfs.ext4 -O "^metadata_csum" /dev/mmcblk0p3





mkfs.ext4 -O "^metadata_csum" /dev/mmcblk0p3 


overlaymount-rootfs.squashfs from sd/ directory, sign it the same way you did with rootfs.squashfs and put the two files in p3 as well




overlaymount-rootfs.squashfs from sd/ directory, sign it the same way you did with rootfs.squashfs and put the two files in p3 as well 










mount overlaymount-rootfs.squashfs /mnt



cat sd/user.sqsh.* > sd/user.sqsh
sudo unsquashfs -f -d [location-of-p4]/ sd/user.sqsh (edited)

cat sd/user.sqsh.* > sd/user.sqsh
sudo unsquashfs -f -d [location-of-p4]/ sd/user.sqsh (edited)






overlaymount-rootfs.squashfs

sudo unsquashfs -f -d /run/media/szybet/wherever/is/your/p4/mounted sd/user.sqsh












arch/arm/configs/imx_v7_kobo_defconfig






console=ttymxc0,115200 rootwait rw no_console_suspend hwcfg_p=0x8ffffe00 hwcfg_sz=110 waveform_p=0x8ff71a00 waveform_sz=582529 ntxfw_p=0x8ff71400 ntxfw_sz=1034 mem=255M boot_port=1 rootfstype=ext4 root=/dev/mmcblk0p1 quiet
Args passed to the kernel at boot



USB_AUDIO



env GITDIR=/home/build/inkbox/kernel TOOLCHAINDIR=/home/build/inkbox/kernel/toolchain/arm-nickel-linux-gnueabihf/ THREADS=16 TARGET=arm-nickel-linux-gnueabihf scripts/build_kernel.sh n306 root /home/build/inkbox/kernel

/home/build/inkbox/kernel AS arch/arm/vfp/vfphw.o
./scripts/gen_initramfs_list.sh: Cannot open '/home/build/inkbox/kernel/initrd/busybox-1.32.1/_install-n306'
make[1]: *** [usr/Makefile:73: usr/initramfs_data.cpio.xz] Błąd 1
make: *** [Makefile:947: usr] Błąd 2
make: *** Oczekiwanie na niezakończone zadania....



dd if=zImage-root of=/dev/mmcblk0 bs=512 seek=81920









kernel/initrd/n306/opt/firmware.sqsh













ntx_gpio_get_value(404) : error parameter ! null ptr !
ESDin=0,UPGKey=-1,PWRKey=0,USBin=0x1,BootESD=0,MenuKey=0
mmc read 0x8ffffc00 0x37ff 0x1
MMC read: dev # 0, block # 14335, count 1 ... 1 blocks read: OK
mmc read 0x8ff71a00 0x3800 0x472
MMC read: dev # 0, block # 14336, count 1138 ... 1138 blocks read: OK
mmc read 0x8ff71800 0x405 0x1
MMC read: dev # 0, block # 1029, count 1 ... 1 blocks read: OK
[WARNING] Binaries load sequence should Lo->Hi !
mmc read 0x8ff71400 0x406 0x3
MMC read: dev # 0, block # 1030, count 3 ... 3 blocks read: OK
Kernel RAM visiable size=255M->255M
ntx_gpio_init():R [ERROR] GPIO group number error (0)!!
ntx_gpio_init():B [ERROR] GPIO group number error (0)!!
hwcfg rootfstype : 2
hwcfg partition type : 2,bootmode=0
ntx_prebootm : cmd=setenv bootargs ${bootargs} hwcfg_p=0x8ffffe00 hwcfg_sz=110 waveform_p=0x8ff71a00 waveform_sz=582529 ntxfw_p=0x8t
Kernel image @ 0x80800000 [ 0x000000 - 0x95e370 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300d274
Starting kernel ... (edited)







GITDIR="${PWD}" scripts/make_devicenodes.sh

/devttymxc0








Starting kernel ...
/cpus/cpu@0 missing clock-frequency property
sy7636-pmic sy7636-pmic: request vcom gpio failed (-16)!
sy7636-pmic sy7636-pmic: request powerup gpio failed (-16)!
syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 80021934 ntx_machine_poweroff
PMU: ricoh61x_battery_probe : version is RICOH61x_BATTERY_VERSION: 2014.02.21 V3.1.0.0-Solution1 2015/02/09
==== calc_soc_by_voltageMethod E60U22 ====
imx6ul-pinctrl 2290000.iomuxc-snvs: pin MX6ULL_PAD_SNVS_TAMPER3 already requested by 21f8000.i2c; cannot claim for gpio-keys
imx6ul-pinctrl 2290000.iomuxc-snvs: pin-5 (gpio-keys) status -22
imx6ul-pinctrl 2290000.iomuxc-snvs: could not request pin 5 (MX6ULL_PAD_SNVS_TAMPER3) from group gpio_snvs_keys_grp on device 22900s
gpio-keys gpio-keys: Error applying setting, reverse things back
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,1)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,1)
imx_epdc_v2_fb 228c000.epdc: Cleared LUT complete for init update











initrd/n306/opt/splash-rootfs.tar.xz?




git log?

git status?




initrd/n306/dev?

git reset --hard will get them back











Starting kernel ...
[ 0.004763] /cpus/cpu@0 missing clock-frequency property
[ 0.423820] sy7636-pmic sy7636-pmic: request vcom gpio failed (-16)!
[ 0.423864] sy7636-pmic sy7636-pmic: request powerup gpio failed (-16)!
[ 5.534496] syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 80021c08 ntx_machine_poweroff
[ 5.545643] PMU: ricoh61x_battery_probe : version is RICOH61x_BATTERY_VERSION: 2014.02.21 V3.1.0.0-Solution1 2015/02/09
[ 5.610660] ==== calc_soc_by_voltageMethod E60U22 ====
[ 5.841222] imx6ul-pinctrl 2290000.iomuxc-snvs: pin MX6ULL_PAD_SNVS_TAMPER3 already requested by 21f8000.i2c; cannot claim for gps
[ 5.856657] imx6ul-pinctrl 2290000.iomuxc-snvs: pin-5 (gpio-keys) status -22
[ 5.863820] imx6ul-pinctrl 2290000.iomuxc-snvs: could not request pin 5 (MX6ULL_PAD_SNVS_TAMPER3) from group gpio_snvs_keys_grp s
[ 5.878155] gpio-keys gpio-keys: Error applying setting, reverse things back
mount: mounting /dev/mmcblk0p1 on /mnt failed: Invalid argument
umount: can't unmount /mnt: Invalid argument
Linux inkbox 4.1.15 #1 SMP PREEMPT Sat Feb 19 21:21:19 CET 2022 armv7l GNU/Linux
InkBox OS, kernel build 3NMth0qo
Copyright (C) 2021-2022 Nicolas Mailloux <nicolecrivain@gmail.com>
Checking filesystems ...
e2fsck 1.46.2 (28-Feb-2021)
Error reading block 114689 (Invalid argument). Ignore error? yes
Force rewrite? yes (edited)mount: mounting /dev/mmcblk0p1 on /mnt failed: Invalid argument
umount: can't unmount /mnt: Invalid argument (edited)














git reset --hard




git status?

quiet from CONFIG_CMDLINE in kernel/config/config-n306



bootloader/mx6ull-n306/board/freescale/mx6ull_ntx/ntx_comm.c
Change DEFAULT_KERNEL_LOAD_SZ to 20480 (edited)


bootloader/mx6ull-n306/board/freescale/mx6ull_ntx/ntx_comm.c
Change DEFAULT_KERNEL_LOAD_SZ to 20480 (edited)







echo rooted | dd of=/dev/mmcblk0 bs=512 seek=79872

echo rooted | dd of=/dev/mmcblk0 bs=512 seek=79872 



Security policy not enforced; root access permitted.
[ 21.852131] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
Verifying root filesystem's digital signature ...
Done.
[ 26.770665] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 26.832827] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
FATAL: InkBox GUI root filesystem's signature is invalid!
Aborting boot and powering off ...
The system is going down NOW!
Sent SIGTERM to all processes
gui_rootfs.isa in p4unsquashfs -f -d g gui_rootfs.isa
cd g
echo "n306" > opt/device
rm ../gui_rootfs.isa
mksquashfs . ../gui_rootfs.isa -b 1048576 -comp xz -Xdict-size 100% -always-use-fragments
cd ..
rm -rf g
Then you can sign it
openssl dgst -sha256 -sign private.pem -out gui_rootfs.isa.dgst gui_rootfs.isa (edited)











[p4]/gui_rootfs.isa



unsquashfs -f -d g gui_rootfs.isa
cd g
echo "n306" > opt/device
rm ../gui_rootfs.isa
mksquashfs . ../gui_rootfs.isa -b 1048576 -comp xz -Xdict-size 100% -always-use-fragments
cd ..
rm -rf g
Then you can sign it
openssl dgst -sha256 -sign private.pem -out gui_rootfs.isa.dgst gui_rootfs.isa (edited)










wget 23.163.0.39/bundles/private/update-n306.isa


cp update.isa [p4]/update/update.isa (edited)




[ ok ]
/usr/bin/inkbox.sh: line 32: can't create /sys/class/leds/pmic_ledsb/brightness: nonexistent dy
[ ok ]
Welcome to InkBox OS 1.9
Kernel 4.1.15 on armv7l (/dev/ttymxc0)
inkbox login: [ 64.246990] IRQ gpio=0, IN_TEN_SYS=0xd1,PWR_ON_TIMES=0x5b,int_sts=0x40,when ig
[ 64.255851] PMU2: Watchdog timeout triggered. ===============
[ 67.445394] PMU: ricoh61x_displayed_work Half-Clear CC, init_pswr(100), cc_delta(0) 






echo 3 > /sys/class/graphics/fb0/rotate
killall inkbox-bin

env QT_QPA_PLATFORM=kobo:touchscreen_rotate=90:touchscreen_invert_x=auto:touchscreen_invert_y=auto:logicaldpitarget=0 chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh

echo 3 > /sys/class/graphics/fb0/rotate
killall inkbox-bin 

env QT_QPA_PLATFORM=kobo:touchscreen_rotate=90:touchscreen_invert_x=auto:touchscreen_invert_y=auto:logicaldpitarget=0 chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh 











/opt/bin/shutdown_led turns it off? (edited)




killall inkbox-bin and relaunch that env command above






find /sys | grep led




echo 1 > /sys/devices/platform/leds/leds/GLED; echo 0 > /sys/devices/platform/leds/leds/GLED










killall lightmaps lightmaps-bin (edited)







QT_LOGGING_RULES=qt.qpa.input to env args













mount [p4]/onboard /mnt

make ARCH=arm CROSS_COMPILE=arm-nickel-linux-gnueabihf- modulesmake ARCH=arm CROSS_COMPILE=arm-nickel-linux-gnueabihf- INSTALL_MOD_PATH=/tmp/modules
And make squashfs of this directoryopt/modules.sqsh






echo true > [p1]/flags/USBNET_ENABLE (edited)


































































/modules























opt/modules.sqsh 

[ 941.008667] imx_epdc_v2_fb 228c000.epdc: waiting for EPD power down ,current state=1... 


18432 to 20480













ls -shal /modules output?

modules.sqsh in p3, it's embedded in the initrd, at opt/modules.sqsh
But if you recompiled the kernel then idk
Did you pull the repo before?






[ 941.008667] imx_epdc_v2_fb 228c000.epdc: waiting for EPD power down ,current state=1... 






[ 7.824733] Modules linked in:
[ 7.827893] CPU: 0 PID: 49 Comm: kworker/0:3 Not tainted 4.1.15 #1
[ 7.834128] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[ 7.840357] Workqueue: events epdc_firmware_work_func
Modules linked in: only displays the loaded modules. If there were some, it would say:
Modules linked in: g_ether sdio_wifi_pwr 8189fs for example






Starting kernel ...
/cpus/cpu@0 missing clock-frequency property
sy7636-pmic sy7636-pmic: request vcom gpio failed (-16)!
sy7636-pmic sy7636-pmic: request powerup gpio failed (-16)!
syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 800217f0 ntx_machine_f
PMU: ricoh61x_battery_probe : version is RICOH61x_BATTERY_VERSION: 2014.02.21 V3.1.0.0-Solutio9
==== calc_soc_by_voltageMethod E60U22 ====
imx6ul-pinctrl 2290000.iomuxc-snvs: pin MX6ULL_PAD_SNVS_TAMPER3 already requested by 21f8000.is
imx6ul-pinctrl 2290000.iomuxc-snvs: pin-5 (gpio-keys) status -22
imx6ul-pinctrl 2290000.iomuxc-snvs: could not request pin 5 (MX6ULL_PAD_SNVS_TAMPER3) from gros
gpio-keys gpio-keys: Error applying setting, reverse things back
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Li.
---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kerne.









kernel/initrd/n306/opt/modules.sqsh, then recompile it, what happens?









fdisk -l








Wybór (domyślnie e): p
Wybrano partycję 4
Pierwszy sektor (2048-31116287, domyślnie 2048): 49152
Sector 49152 is already allocated.
[ ok ]
* WARNING: clock skew detected!
insmod: ERROR: could not load module /modules/arcotg_udc.ko: No such file or directory
[ !! ]
* ERROR: modules_init failed to start
* Mounting onboard storage filesystem ...
[ ok ]
* Splash screen ...
[ ok ]
* Starting USBNet ...
* USB networking is disabled. Please set the USBNET_ENABLE flag and try again.
[ ok ]
* WARNING: clock skew detected!
insmod: ERROR: could not load module /modules/arcotg_udc.ko: No such file or directory
[ !! ]
* ERROR: modules_init failed to startkobo:~# ls -shal /modules
total 1K
0 drwxr-xr-x 5 user user 52 Feb 20 2022 .
1 drwxr-xr-x 29 root root 1.0K Jan 1 00:16 ..
0 drwxr-xr-x 4 user user 37 Feb 20 2022 drivers
0 drwxr-xr-x 3 user user 31 Feb 20 2022 fs
0 drwxr-xr-x 2 user user 32 Feb 20 2022 wifi
kobo:~# 

echo 3 > /sys/class/graphics/fb0/rotate
killall inkbox-bin 






env GITDIR="${PWD}" ./release.sh
Does that remind you of something?


[root@ArchSzybet rootfs]# env GITDIR="${PWD}" ./release.sh
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on ../rootfs.squashfs, block size 1048576.
[============================================================================\] 6979/6979 100%
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 1048576
compressed data, compressed metadata, compressed fragments,
compressed xattrs, compressed ids
duplicates are removed
Filesystem size 73621.37 Kbytes (71.90 Mbytes)
34.22% of uncompressed filesystem size (215152.91 Kbytes)
Inode table size 74379 bytes (72.64 Kbytes)
25.76% of uncompressed inode table size (288710 bytes)
Directory table size 79735 bytes (77.87 Kbytes)
46.50% of uncompressed directory table size (171486 bytes)
Number of duplicate files found 666
Number of inodes 8427
Number of files 6899
Number of fragments 131
Number of symbolic links 904
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 624
Number of ids (unique uids + gids) 2
Number of uids 2
root (0)
szybet (1002)
Number of gids 2
root (0)
szybet (1002)
Root filesystem has been compressed. (edited)

openssl dgst -sha256 -sign private.pem -out rootfs.squashfs.dgst rootfs.squashfs 







lsmod?



dhcpcd I think)

dmesg | tail?




lsmod?

find /modules

insmod /modules/drivers/usb/gadget/legacy/g_mass_storage.ko? (edited)



/usr/local/bin/wifi/connect_to_network.sh ssid_there passphrase_there
[root@ArchSzybet resources]# insmod /modules/drivers/usb/gadget/legacy/g_mass_storage.ko
insmod: ERROR: could not load module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: No such file or directory




kobo:~# insmod /modules/drivers/usb/gadget/legacy/g_mass_storage.ko
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: Ue
kobo:~# 


kobo:~# insmod /modules/drivers/usb/gadget/legacy/g_mass_storage.ko
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: Ue
kobo:~# 
kobo:~# insmod /modules/drivers/usb/gadget/legacy/g_mass_storage.ko
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: Unknown symbol in module
kobo:~#kobo:~# /usr/local/bin/wifi/connect_to_network.sh hotspotttssss 12345678
ifconfig: ioctl 0x8913 failed: No such device
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
no such user dhcpcd
dhcpcd-9.4.0 starting
eth0: waiting for carrier
timed out
dhcpcd exited
dhcpcd_fork_cb: truncated read 0 (expected 4)
DHCP request failed.
udhcpc -i eth0?

kobo:~# insmod /modules/drivers/usb/gadget/legacy/g_mass_storage.ko
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: Ue
kobo:~# 

[root@ArchSzybet resources]# ssh root@10.42.0.28
The authenticity of host '10.42.0.28 (10.42.0.28)' can't be established.
ED25519 key fingerprint is SHA256:58MR3tZxGQMSKnyf5y6N6F2scXOG2wQ7IC33dMsJmDA.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.42.0.28' (ED25519) to the list of known hosts.
root@10.42.0.28's password:
Welcome to InkBox!
* Warning *
Root filesystem is mounted read-only.
Invoke `ifsctl mnt rootfs rw' to make it read-write.
kobo:~# udhcpc -i eth0
udhcpc: started, v1.33.0
udhcpc: sending discover
udhcpc: sending select for 10.42.0.28
udhcpc: lease of 10.42.0.28 obtained, lease time 3600
kobo:~# 


chroot /kobo fbgrab /tmp/dump.png


chroot /kobo fbgrab /tmp/dump.png 
cat /data/config/09-dpi/config?



echo 195 > /data/config/09-dpi/configrc-service inkbox_gui restart


cat /data/config/09-dpi/config?

echo 195 > /data/config/09-dpi/config
killall inkbox-bin; env QT_QPA_PLATFORM=kobo chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh (edited)
kobo:~# echo 195 > /data/config/09-dpi/config
kobo:~#
kobo:~# killall inkbox-bin; chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh
Terminated
iniparser: cannot open /mnt/onboard/.kobo/nightmode.ini
cat: can't open '/mnt/onboard/.kobo/Kobo/Kobo eReader.conf': No such file or directory
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this probl.
Available platform plugins are: kobo, vnc.
Aborted
kobo:~# 











chroot /kobo fbgrab /tmp/dump.png 


kobo:~# udhcpc -i eth0
udhcpc: started, v1.33.0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc failed to get a DHCP lease
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc failed to get a DHCP lease
^C
kobo:~# 
echo true > /boot/flags/USBNET_ENABLEifconfig usb0 192.168.2.2, then ssh root@192.168.2.2 to connect







insmod /modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod /modules/drivers/usb/gadget/legacy/g_mass_storage




insmod /modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod /modules/drivers/usb/gadget/legacy/g_mass_storage 
kobo:~# insmod /modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/function/usb_f_mass_storage.ko: Unknown symbol in module
kobo:~# insmod /modules/drivers/usb/gadget/legacy/g_mass_storage
insmod: ERROR: could not load module /modules/drivers/usb/gadget/legacy/g_mass_storage: No such file or directory
kobo:~# 




insmod "/modules/fs/configfs/configfs.ko"
insmod "/modules/drivers/usb/gadget/libcomposite.ko"
insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable=y stall=0 (edited)
































insmod "/modules/fs/configfs/configfs.ko"
insmod "/modules/drivers/usb/gadget/libcomposite.ko"
insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable=y stall=0 (edited)
kobo:~# insmod "/modules/fs/configfs/configfs.ko"
insmod: ERROR: could not insert module /modules/fs/configfs/configfs.ko: File exists
kobo:~# [ 3995.928562] ==== DISABLE ibat ====
kobo:~# insmod "/modules/drivers/usb/gadget/libcomposite.ko"
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/libcomposite.ko: File exists
kobo:~# insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
> ^C
kobo:~# insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko"
kobo:~# insmod "/modules/drivers/usb/gadget/legacy/g_mass_storage.ko"
[ 4013.100897] no file given for LUN0
[ 4013.104348] g_mass_storage ci_hdrc.0: failed to start g_mass_storage: -22
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: Invalid parameters
kobo:~# insmod "/modules/drivers/usb/gadget/legacy/g_mass_storage.ko"
[ 4021.057430] no file given for LUN0
[ 4021.062868] g_mass_storage ci_hdrc.0: failed to start g_mass_storage: -22
insmod: ERROR: could not insert module /modules/drivers/usb/gadget/legacy/g_mass_storage.ko: Invalid parameters
kobo:~# [ 4025.062738] ==== DISABLE ibat ====
* WARNING: you are stopping a boot service
* Unmounting onboard storage filesystem ...
[ ok ]
* WARNING: you are stopping a boot service
* Stopping USBNet ...
rmmod: ERROR: Module /modules/g_ether is not currently loaded
[ !! ]
* ERROR: usbnet failed to stop
[ 4054.385494] ==== DISABLE ibat ====




rmmod all the modules you have loaded now



insmod "/modules/fs/configfs/configfs.ko"
insmod "/modules/drivers/usb/gadget/libcomposite.ko"
insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable=y stall=0 (edited)
kobo:~# lsmod
Module Size Used by
usb_f_mass_storage 38079 0
libcomposite 44430 1 usb_f_mass_storage
configfs 23581 3 libcomposite,usb_f_mass_storage
8189fs 1294344 0
sdio_wifi_pwr 593 0
kobo:~#
so i:
rmod usb_f_mass_storage
rmod libcomposite
rmod configfs
right?



kobo:~# insmod "/modules/fs/configfs/configfs.ko"
kobo:~# insmod "/modules/drivers/usb/gadget/libcomposite.ko"
kobo:~# insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko"
kobo:~# insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable
=y stall=0
insmod: ERROR: could not load module /modules/g_mass_storage.ko: No such file or directory
kobo:~# insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable
=y stall=0
insmod: ERROR: could not load module /modules/g_mass_storage.ko: No such file or directory
kobo:~# hmm
/modules/g_mass_storage.ko to /modules/drivers/usb/gadget/legacy/g_mass_storage.ko





modprobe











/data/firmware/update.isa
sync and reboot

/data/firmware is a symlink to [p4]/update






cat /data/config/09-dpi/config? 







extload it from U-Boot




find /modules
kobo:~# find /modules
/modules
/modules/drivers
/modules/drivers/mmc
/modules/drivers/mmc/card
/modules/drivers/mmc/card/sdio_wifi_pwr.ko
/modules/drivers/usb
/modules/drivers/usb/gadget
/modules/drivers/usb/gadget/function
/modules/drivers/usb/gadget/function/u_ether.ko
/modules/drivers/usb/gadget/function/usb_f_acm.ko
/modules/drivers/usb/gadget/function/usb_f_ecm.ko
/modules/drivers/usb/gadget/function/usb_f_ecm_subset.ko
/modules/drivers/usb/gadget/function/usb_f_eem.ko
/modules/drivers/usb/gadget/function/usb_f_fs.ko
/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
/modules/drivers/usb/gadget/function/usb_f_obex.ko
/modules/drivers/usb/gadget/function/usb_f_rndis.ko
/modules/drivers/usb/gadget/legacy
/modules/drivers/usb/gadget/legacy/g_ether.ko
/modules/drivers/usb/gadget/legacy/g_mass_storage.ko
/modules/drivers/usb/gadget/libcomposite.ko
/modules/fs
/modules/fs/configfs
/modules/fs/configfs/configfs.ko
/modules/g_mass_storage.ko
/modules/wifi
/modules/wifi/8189fs.ko
lsmod?
kobo:~#
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# lsmod
Module Size Used by
kobo:~# 







Settings -> Page 2 -> Generate system report

/usr/local/bin/generate_system_report.sh








kobo:~# insmod "/modules/fs/configfs/configfs.ko"
kobo:~# insmod "/modules/drivers/usb/gadget/libcomposite.ko"
kobo:~# insmod "/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko"
kobo:~# insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable
=y stall=0
insmod: ERROR: could not load module /modules/g_mass_storage.ko: No such file or directory
kobo:~# insmod /modules/g_mass_storage.ko file="/data/storage/onboard" removable
=y stall=0
insmod: ERROR: could not load module /modules/g_mass_storage.ko: No such file or directory
kobo:~# hmm 




dmesg?

cd ~/Downloads
busybox httpd -p 8000 -f
On Kobo:
rm /tmp/inkbox; wget your.computer.ip.there:8000/inkbox -O /tmp/inkbox; chmod +x /tmp/inkbox; umount -l -f /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; mount --bind /tmp/inkbox /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; killall inkbox-bin inkbox inkbox.sh; env QT_QPA_PLATFORM=kobo chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.shrmmod all modules related to usb mass storage



cd ~/Downloads
busybox httpd -p 8000 -f
On Kobo:
rm /tmp/inkbox; wget your.computer.ip.there:8000/inkbox -O /tmp/inkbox; chmod +x /tmp/inkbox; umount -l -f /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; mount --bind /tmp/inkbox /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; killall inkbox-bin inkbox inkbox.sh; env QT_QPA_PLATFORM=kobo chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh 

/usr/local/bin/wifi/connect_to_wifi.sh before?


ls -shal /sys/devices/platform/leds/leds/GLED

echo 1 > /sys/devices/platform/leds/leds/GLED/brightness; echo 0 > /sys/devices/platform/leds/leds/GLED/brightness turns it off right?


echo 1 > /sys/devices/platform/leds/leds/GLED/brightness; echo 0 > /sys/devices/platform/leds/leds/GLED/brightness turns it off right? 
find /usr/local/bin

kobo:~# find /usr/local/bin/
/usr/local/bin/
/usr/local/bin/htmldoc
/usr/local/bin/ota_update.sh
/usr/local/bin/unionfs
/usr/local/bin/wifi
/usr/local/bin/wifi/toggle.sh
/usr/local/bin/wifi/connect_to_network.sh
/usr/local/bin/wifi/list_networks.sh
/usr/local/bin/unionfsctl
/usr/local/bin/generate_system_report.sh
/usr/local/bin/gutenberg
/usr/local/bin/gutenberg/fetch_catalog.sh
/usr/local/bin/gutenberg/get_book.sh
/usr/local/bin/gutenberg/get_latest_books.sh
/usr/local/bin/gutenberg/search_catalog.sh
/usr/local/bin/zsh-5.8.1
/usr/local/bin/htop
/usr/local/bin/zsh
/usr/local/bin/appvnc_start.sh




kobo:~# /usr/local/bin/wifi/connect_to_network.sh hotspotttssss 12345678
ifconfig: ioctl 0x8913 failed: No such device
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
no such user dhcpcd
dhcpcd-9.4.0 starting
eth0: waiting for carrier
timed out
dhcpcd exited
dhcpcd_fork_cb: truncated read 0 (expected 4)
DHCP request failed.
kobo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
kobo:~# udhcpc -i eth0
udhcpc: ioctl 0x8933 failed: No such device
kobo:~# 
/modules/wifi/8189fs.kocat /usr/local/bin/wifi/connect_to_network.sh

dmesg and lsmod please

insmod /modules/drivers/mmc/card/sdio_wifi_pwr.ko
\kobo:~# insmod /modules/drivers/mmc/card/sdio_wifi_pwr.ko
kobo:~# lsmod
Module Size Used by
sdio_wifi_pwr 593 0
8189fs 1294344 0
usb_f_mass_storage 38079 0
libcomposite 44430 1 usb_f_mass_storage
configfs 23581 3 libcomposite,usb_f_mass_storage
kobo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
5: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 58:b0:d4:9d:a6:8e brd ff:ff:ff:ff:ff:ff
kobo:~#
\

kobo:~# lsmod
Module Size Used by
usb_f_mass_storage 38079 0
libcomposite 44430 1 usb_f_mass_storage
configfs 23581 3 libcomposite,usb_f_mass_storage
kobo:~# 







kobo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 58:b0:d4:9d:a6:8e brd ff:ff:ff:ff:ff:ff
inet 10.42.0.28/24 brd 10.42.0.255 scope global eth0
valid_lft forever preferred_lft forever


cd ~/Downloads
busybox httpd -p 8000 -f
On Kobo:
rm /tmp/inkbox; wget your.computer.ip.there:8000/inkbox -O /tmp/inkbox; chmod +x /tmp/inkbox; umount -l -f /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; mount --bind /tmp/inkbox /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; killall inkbox-bin inkbox inkbox.sh; env QT_QPA_PLATFORM=kobo chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh 

kobo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 58:b0:d4:9d:a6:8e brd ff:ff:ff:ff:ff:ff
inet 10.42.0.28/24 brd 10.42.0.255 scope global eth0
valid_lft forever preferred_lft forever 




% ps aux | grep dnsmasq
nobody 307584 0.0 0.0 21688 6808 ? S 15:23 0:00 /usr/bin/dnsmasq --conf-file=/dev/null --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10.42.0.1 --dhcp-range=10.42.0.10,10.42.0.254,60m --dhcp-lease-max=50 --dhcp-leasefile=/var/lib/NetworkManager/dnsmasq-wlp3s0.leases --pid-file=/var/run/nm-dnsmasq-wlp3s0.pid --conf-dir=/etc/NetworkManager/dnsmasq-shared.d
szybet 482350 0.0 0.0 9548 2560 pts/7 S+ 18:14 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox dnsmasq
18:14 szybet@ArchSzybet /home/szybet

% ps aux | grep dnsmasq
nobody 307584 0.0 0.0 21688 6808 ? S 15:23 0:00 /usr/bin/dnsmasq --conf-file=/dev/null --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10.42.0.1 --dhcp-range=10.42.0.10,10.42.0.254,60m --dhcp-lease-max=50 --dhcp-leasefile=/var/lib/NetworkManager/dnsmasq-wlp3s0.leases --pid-file=/var/run/nm-dnsmasq-wlp3s0.pid --conf-dir=/etc/NetworkManager/dnsmasq-shared.d
szybet 482350 0.0 0.0 9548 2560 pts/7 S+ 18:14 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox dnsmasq
18:14 szybet@ArchSzybet /home/szybet dmesg and lsmod



[ 651.464636] g_mass_storage: Unknown symbol fsg_common_set_ops (err 0)
[ 651.464680] g_mass_storage: Unknown symbol fsg_common_set_sysfs (err 0)
[ 651.464704] g_mass_storage: Unknown symbol usb_get_function_instance (err 0)
[ 651.464716] g_mass_storage: Unknown symbol fsg_common_run_thread (err 0)
[ 651.464734] g_mass_storage: Unknown symbol usb_string_ids_tab (err 0)
[ 651.464751] g_mass_storage: Unknown symbol fsg_common_free_luns (err 0)
[ 651.464763] g_mass_storage: Unknown symbol usb_get_function (err 0)
[ 651.464776] g_mass_storage: Unknown symbol usb_composite_unregister (err 0)
[ 651.464788] g_mass_storage: Unknown symbol usb_put_function (err 0)
[ 651.464800] g_mass_storage: Unknown symbol fsg_common_create_luns (err 0)
[ 651.464813] g_mass_storage: Unknown symbol usb_add_function (err 0)
[ 651.464826] g_mass_storage: Unknown symbol usb_composite_probe (err 0)
[ 651.464842] g_mass_storage: Unknown symbol usb_composite_overwrite_options (err 0)
[ 651.464854] g_mass_storage: Unknown symbol usb_otg_descriptor_alloc (err 0)
[ 651.464867] g_mass_storage: Unknown symbol usb_put_function_instance (err 0)
[ 651.464878] g_mass_storage: Unknown symbol fsg_common_set_cdev (err 0)
[ 651.464892] g_mass_storage: Unknown symbol fsg_common_free_buffers (err 0)
[ 651.464905] g_mass_storage: Unknown symbol usb_otg_descriptor_init (err 0)
[ 651.464921] g_mass_storage: Unknown symbol fsg_common_set_nluns (err 0)
[ 651.464934] g_mass_storage: Unknown symbol fsg_common_remove_luns (err 0)
[ 651.464945] g_mass_storage: Unknown symbol usb_add_config (err 0)
[ 651.464958] g_mass_storage: Unknown symbol fsg_common_set_inquiry_string (err 0)
[ 651.464970] g_mass_storage: Unknown symbol fsg_common_set_num_buffers (err 0)
[ 651.464982] g_mass_storage: Unknown symbol fsg_config_from_params (err 0)

lsmod right?
kobo:~# lsmod
Module Size Used by
8189fs 1294344 0
sdio_wifi_pwr 593 0
kobo:~# 
cat /kobo/opt/inkbox_device


echo n306 > /kobo/opt/inkbox_device




kobo:~# rm /tmp/inkbox; wget 10.42.0.1:8000/inkbox -O /tmp/inkbox; chmod +x /tmp
/inkbox; umount -l -f /kobo/mnt/onboard/.adds/inkbox/inkbox-bin; mount --bind /t
^[[A^[[B^[[A^[[B^C
kobo:~# ^C
insmod: can't insert '/external_root/modules/fs/configfs/configfs.ko': File exists
insmod: can't insert '/external_root/modules/drivers/usb/gadget/libcomposite.ko': File exists
insmod: can't insert '/external_root/modules/drivers/usb/function/usb_f_mass_storage.ko': No such file or directory
ls /kobo/external_root/modules/drivers/usb/function/usb_f_mass_storage.ko

kobo:~# lsmod
Module Size Used by
libcomposite 44430 0
configfs 23581 2 libcomposite
8189fs 1294344 0
sdio_wifi_pwr 593 0
kobo:~# 

kobo:~# ls /kobo/external_root/modules/drivers/usb/function/usb_f_mass_storage.ko
ls: /kobo/external_root/modules/drivers/usb/function/usb_f_mass_storage.ko: No such file or directory
kobo:~# ls /kobo/external_root/modules/drivers/usb/gadget/
function/ legacy/ libcomposite.ko
kobo:~# ls /kobo/external_root/modules/drivers/usb/gadget/
function/ legacy/ libcomposite.ko
kobo:~# ls /kobo/external_root/modules/drivers/usb/gadget/function/u
u_ether.ko usb_f_ecm_subset.ko usb_f_mass_storage.ko
usb_f_acm.ko usb_f_eem.ko usb_f_obex.ko
usb_f_ecm.ko usb_f_fs.ko usb_f_rndis.ko
kobo:~# ls /kobo/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
/kobo/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko
kobo:~# 



cat: can't open '/mnt/onboard/.kobo/Kobo/Kobo eReader.conf': No such file or directory
insmod: can't insert '/external_root/modules/fs/configfs/configfs.ko': File exists
insmod: can't insert '/external_root/modules/drivers/usb/gadget/libcomposite.ko': File exists








htop to see what it's doingtop if you're in a serial console












nmap -sP 10.42.0.0/24 on your host otherwise

nmap -sP 10.42.0.0/24 on your host otherwise 





dmesg?







cat /data/config/17-wifi_connection_information/*




















This plugin does not support setParent!
Gutenberg sync encountered an error






sh -x /usr/local/bin/gutenberg/fetch_catalog.sh
kobo:~# sh -x /usr/local/bin/gutenberg/fetch_catalog.sh
+ mkdir -p /data/storage/gutenberg
+ cd /data/storage/gutenberg
+ date '+%s'
+ rm -f catalog.csv
+ wget -O catalog.csv http://www.gutenberg.org/cache/epub/feeds/pg_catalog.csv
--2012-01-01 18:11:41-- http://www.gutenberg.org/cache/epub/feeds/pg_catalog.csv
Resolving www.gutenberg.org... 152.19.134.47, 2610:28:3090:3000:0:bad:cafe:47
Connecting to www.gutenberg.org|152.19.134.47|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://www.gutenberg.org/cache/epub/feeds/pg_catalog.csv [following]
--2012-01-01 18:11:42-- https://www.gutenberg.org/cache/epub/feeds/pg_catalog.csv
Connecting to www.gutenberg.org|152.19.134.47|:443... connected.
ERROR: cannot verify www.gutenberg.org's certificate, issued by 'CN=Network Solutions OV Server CA 2,O=Network:
Issued certificate not yet valid.
To connect to www.gutenberg.org insecurely, use `--no-check-certificate'.
+ exit 1
kobo:~# 



date -s "2022-03-06 19:17hwclock --systohc

sudo date -s "$(wget --method=HEAD -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f2-7)"

hwclock --systohc after that











rc-service inkbox_gui restart






























mutool in the process list with top or ps?











1.8-86-g56db7ea


restart inkbox_gui




















restart inkbox_gui and try to open the system report pdf, does it work?
kobo:~# ps aux | grep mutool
3541 root 0:00 grep mutool
kobo:~#
its while in the opened pdf that works














kobo:~# umount: can't unmount /inkbox: Invalid argument
iniparser: cannot open /mnt/onboard/.kobo/nightmode.ini
cat: can't open '/mnt/onboard/.kobo/Kobo/Kobo eReader.conf': No such file or directory
QCoreApplication::postEvent: Unexpected null receiver
sha256sum: /kobo/mnt/onboard/onboard/WS2811.pdf: No such file or directory
mount: mounting /opt/config/07-words_number on /kobo/mnt/onboard/.adds/inkbox/.config/07-words_number failed: y
mount: mounting /opt/config/08-recent_books on /kobo/mnt/onboard/.adds/inkbox/.config/08-recent_books failed: y
mount: mounting /opt/config/11-menubar on /kobo/mnt/onboard/.adds/inkbox/.config/11-menubar failed: No such fiy
mount: mounting /opt/config/13-epub_page_size on /kobo/mnt/onboard/.adds/inkbox/.config/13-epub_page_size faily
mount: mounting /opt/config/14-reader_scrollbar on /kobo/mnt/onboard/.adds/inkbox/.config/14-reader_scrollbar y
QIODevice::read (QFile, "/inkbox/book/split/."): device not open
QIODevice::read (QFile, "/inkbox/book/split/.."): device not open 
mount





kobo:~# umount: can't unmount /inkbox: Invalid argument
iniparser: cannot open /mnt/onboard/.kobo/nightmode.ini
cat: can't open '/mnt/onboard/.kobo/Kobo/Kobo eReader.conf': No such file or directory
QCoreApplication::postEvent: Unexpected null receiver
QCoreApplication::postEvent: Unexpected null receiver
sha256sum: /kobo/mnt/onboard/onboard/WS2811.pdf: No such file or directory
mount: mounting /opt/config/07-words_number on /kobo/mnt/onboard/.adds/inkbox/.config/07-words_number failed: No such file or directory
mount: mounting /opt/config/08-recent_books on /kobo/mnt/onboard/.adds/inkbox/.config/08-recent_books failed: No such file or directory
mount: mounting /opt/config/11-menubar on /kobo/mnt/onboard/.adds/inkbox/.config/11-menubar failed: No such file or directory
mount: mounting /opt/config/13-epub_page_size on /kobo/mnt/onboard/.adds/inkbox/.config/13-epub_page_size failed: No such file or directory
mount: mounting /opt/config/14-reader_scrollbar on /kobo/mnt/onboard/.adds/inkbox/.config/14-reader_scrollbar failed: No such file or directory
QIODevice::read (QFile, "/inkbox/book/split/."): device not open
QIODevice::read (QFile, "/inkbox/book/split/.."): device not open
mount?

mount, then post the output

CSUM=$(sha256sum /data/onboard/WS2811.pdf | awk '{ print $1 }')
ls -shalR "/data/onboard/.${CSUM}" (edited)

kobo:~# CSUM=$(sha256sum /data/onboard/elektronics/WS2811.pdf | awk '{ print $1
}')
ls: /data/onboard/elektronics/.b679e125ca8793e9c2fc5dbe19897c2ca92226409459f2e590b38634a832f59e: No such file or directoy
kobo:~#






QIODevice::read (QFile, "/inkbox/book/split/."): device not open
QIODevice::read (QFile, "/inkbox/book/split/.."): device not open
QPixmap::scaled: Pixmap is a null pixmap












bookconfig_mount function at the top of the file too)





















restart inkbox_gui?



restart inkbox_gui? 















rc-service inkbox_gui restart to see inkbox stdout


















Server terminated successfully (0). Closing log file
ps if geany is running
kobo:~# free
total used free shared buff/cache available
Mem: 250128 90136 2712 1696 157280 137400
Swap: 0 0 0




available part










echo true > /boot/flags/DISPLAY_DEBUG



qmake .
make



















while true; do ls -shal /kobo/run /kobo/inkbox; sleep 1; done





















dirIt.fileName() while I should also save dirIt.filePath() to allow opening files in subdirs












ps | grep inkbox-bin, does that give anything?


ps | grep inkbox-bin, does that give anything? 


















cp /etc/init.d/inkbox_gui /tmp
vi /tmp/inkbox_guimount --bind /tmp/inkbox_gui /etc/init.d/inkbox_gui
rc-service inkbox_gui restartchroot /kobo /bin/kobo_config.sh it should output luna, right?

chroot /kobo /bin/kobo_config.sh it should output luna, right? 






vireset so that your terminal isn't messed up anymore



[FBInk] Unidentified Kobo device code (40)!
kobofb: Finished initialization.
[FBInk] [refresh_kobo] MXCFB_SEND_UPDATE_V1_NTX: Operation not permitted!
[FBInk] [fbink_refresh] Failed to refresh the screen!
[FBInk] [refresh_kobo] MXCFB_SEND_UPDATE_V1_NTX: Operation not permitted!
[FBInk] [fbink_refresh] Failed to refresh the screen!
[FBInk] [refresh_kobo] MXCFB_SEND_UPDATE_V1_NTX: Operation not permitted!
[FBInk] [fbink_refresh] Failed to refresh the screen!


cat /sys/class/graphics/fb0/rotate

fbink -k -f does something?
[FBInk] Couldn't find a Kobo version tag (onboard unmounted or not running on a Kobo?)!
[FBInk] Detected a Kobo Nia (382 => Luna @ Mark 7)
[FBInk] Enabled Kobo Mark 7 quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 212 dpi
[FBInk] Variable fb info: 758x1024, 8bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 768s
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 47 cols, Page size: 64 rows
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
[FBInk] [refresh_kobo_mk7] MXCFB_SEND_UPDATE_V2: Operation not permitted!
[FBInk] [fbink_cls] Failed to refresh the screen!
rc-service inkbox_gui restart






ls -shal /kobo/mnt/onboard/.adds/qt-linux-5.15.2-kobo/lib/plugins/platforms/libkobo.so



ls -shal /kobo/mnt/onboard/.adds/qt-linux-5.15.2-kobo/lib/plugins/platforms/libkobo.so 


ls -shal /kobo/mnt/onboard/.adds/qt-linux-5.15.2-kobo/plugins/platforms/libkobo.so sorry





[FBInk] Unidentified Kobo device code (40)!
kobofb: Finished initialization.





libvnc.so, which allows creating a VNC server to which you can connect with a client. It is used in InkBox OS emulator to interact with the UI because implementing a touch screen in QEMU would be difficult. Assuming that your VNC viewer maps touch input correctly and does not trigger the same kernel bug that the platform plugin did, this would provide a complete, stable and painless UI hardware abstraction layer. (edited)

libvnc.so, which allows creating a VNC server to which you can connect with a client. It is used in InkBox OS emulator to interact with the UI because implementing a touch screen in QEMU would be difficult. Assuming that your VNC viewer maps touch input correctly and does not trigger the same kernel bug that the platform plugin did, this would provide a complete, stable and painless UI hardware abstraction layer. (edited)









killall inkbox-bin; env QT_QPA_PLATFORM=vnc:size=768x1024 chroot /kobo /mnt/onboard/.adds/inkbox/inkbox.sh
You can try the VNC server this way















































scp update-n306.isa root@192.168.2.2:/data/firmware/update.isa and you're done



















evtest /dev/input/event0
4. Put the cover on the device as if you were putting it to sleep
5. Remove the cover from the screen
6. Post output of command in step 3.

killall evtest before to ungrab the device
i'd do it directly in the initrd








































KEY_F1













echo true > /boot/flags/USBNET_ENABLE
echo 192.168.x.x > /boot/flags/USBNET_IP and it will stay like that (edited)KEY_F1 as the second key


echo true > /boot/flags/USBNET_ENABLE
echo 192.168.x.x > /boot/flags/USBNET_IP and it will stay like that (edited)






ls /dev/input?



evtest /dev/input/event1
Please post event codes list











mouse0 is up to
evtest /dev/input/mouse0





[FBInk] [refresh_kobo_mk7] MXCFB_SEND_UPDATE_V2: Operation not permitted!
[FBInk] [fbink_cls] Failed to refresh the screen!
now it started doing something like this EDIT: it happens only when KOBOX ( xorg ) is enabled
interesting, right? do you know why? (edited)



mouse0 is up to
evtest /dev/input/mouse0 

[ 4673.449265] RTL871X: mmc1:0001:1: cannot remain alive while host is suspended
[ 4673.449290] dpm_run_callback(): pm_generic_suspend+0x0/0x30 returns -38
[ 4673.455921] PM: Device mmc1:0001:1 failed to suspend: error -38
hmm... (edited)kobo:/dev/input# echo "mem" > /sys/power/state
ash: write error: Function not implemented


if [ "$DEVICE" == "n306" ]; then
killall -q dhcpcd wpa_supplicant
ifconfig eth0 down
rmmod 8189fs.ko 2> /dev/null
rmmod sdio_wifi_pwr.ko 2> /dev/null
fi
and now suspend works without issues. I will test it more tommorow


if [ "$DEVICE" == "n306" ]; then
killall -q dhcpcd wpa_supplicant
ifconfig eth0 down
rmmod 8189fs.ko 2> /dev/null
rmmod sdio_wifi_pwr.ko 2> /dev/null
fi
and now suspend works without issues. I will test it more tommorow 

evtest /dev/input/event0

echo mem > /sys/power/state, the scripts hangs while the device sleeps, then when it wakes up, it executes the rest of the commands in it. (edited)

[FBInk] [refresh_kobo_mk7] MXCFB_SEND_UPDATE_V2: Operation not permitted!
[FBInk] [fbink_cls] Failed to refresh the screen!
now it started doing something like this EDIT: it happens only when KOBOX ( xorg ) is enabled
interesting, right? do you know why? (edited)

/tmp/power file which contains event0 events to avoid memory leak (edited)

mount /dev/mmcblk0p3 /mnt
rm -rf /mnt/rootfs/write
sync
umount /mnt
reboot

/etc/init.d/sleep_standby but they actually just launch the sleep_standby.sh script). (edited)



evtest /dev/input/event0 



mount /dev/mmcblk0p3 /mnt
rm -rf /mnt/rootfs/write
sync
umount /mnt
reboot 

/tmp/power file which contains event0 events to avoid memory leak (edited)

























































-Oupdate-n306.isa to update.isawget http://23.163.0.39/bundles/private/update-n306.isa -O /data/firmware/update.isa (edited)

sync and restart inkbox_gui

/opt/storage/update



ntpd -n -q -N -p time.cloudflare.com gives me a hour back than my real time?





ntpd -n -q -N -p time.cloudflare.com gives me a hour back than my real time? 













/usr/share/zoneinfo already thereinkbox:/# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
inkbox:/# date
Fri Mar 11 14:20:25 EST 2022
inkbox:/#
Awesome

/run/localtime or /tmp/localtime which is a symlink to /usr/share/zoneinfo/your/timezone and bind-mount that file to an empty file named localtime in /etc



/run/localtime or /tmp/localtime which is a symlink to /usr/share/zoneinfo/your/timezone and bind-mount that file to an empty file named localtime in /etc 
inkbox:/# ln -s /usr/share/zoneinfo/America/New_York /tmp/localtime
inkbox:/# date
Fri Mar 11 19:22:13 UTC 2022
inkbox:/# mount --bind /tmp/localtime /etc/localtime
inkbox:/# date
Fri Mar 11 14:22:26 EST 2022
inkbox:/#
This works

inkbox:/# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
inkbox:/# date
Fri Mar 11 14:20:25 EST 2022
inkbox:/#
Awesome 

/usr/local/bin/wifi/connect_to_network.sh the main script when connecting to wifi?
/data/config/19-timezone/config which contains timezone config, then syncs ntp and sets timezone in /etc/localtime

/usr/local/bin/wifi/connect_to_network.sh the main script when connecting to wifi? 

/usr/local/bin/wifi/connect_to_network.sh the main script when connecting to wifi? 


/usr/local/bin/ntpsync.sh after udhcpc/dhcpcd complete

touch etc/localtime

/usr/local/bin/ntpsync.sh after udhcpc/dhcpcd complete 
timesync.sh actually since it also changes the timezone


/etc/init.d/hostname for example and create /etc/init.d/timezone which would change the timezone

/etc/init.d/hostname for example and create /etc/init.d/timezone which would change the timezone 
/etc/init.d/timezone to /etc/runlevels/boot/timezone to make it run at boot/data/config? (edited)/data/config/19-timezone/config would point to a path in the rootfs, for example /usr/share/zoneinfo/America/New_York




inkbox:/# ln -s /usr/share/zoneinfo/America/New_York /tmp/localtime
inkbox:/# date
Fri Mar 11 19:22:13 UTC 2022
inkbox:/# mount --bind /tmp/localtime /etc/localtime
inkbox:/# date
Fri Mar 11 14:22:26 EST 2022
inkbox:/#
This works 






exit 1 if there is an error
ntpd -n -q & at the end








ntpd -n -q too
inkbox:/usr/share/openrc/support# test=1
inkbox:/usr/share/openrc/support# if test=1; then false; fi
inkbox:/usr/share/openrc/support# $?
-ash: 1: not found
inkbox:/usr/share/openrc/support#
inkbox:/usr/share/openrc/support# if test=1; then true; fi
inkbox:/usr/share/openrc/support# $?
-ash: 0: not found
inkbox:/usr/share/openrc/support#
Actually, it seems I'm wrong (edited)


inkbox:/usr/share/openrc/support# test=1
inkbox:/usr/share/openrc/support# if test=1; then false; fi
inkbox:/usr/share/openrc/support# $?
-ash: 1: not found
inkbox:/usr/share/openrc/support#
inkbox:/usr/share/openrc/support# if test=1; then true; fi
inkbox:/usr/share/openrc/support# $?
-ash: 0: not found
inkbox:/usr/share/openrc/support#
Actually, it seems I'm wrong (edited)







/etc/localtime to /data/config/19-timezone/config? (edited)


/data/config/19-timezone/config would need to contain the contents of the corresponding file in /usr/share/zoneinfo

/data/config/19-timezone/config would need to contain the contents of the corresponding file in /usr/share/zoneinfo 


inkbox:/# ls -shal /etc/localtime
0 lrwxrwxrwx 1 root root 31 Mar 11 14:53 /etc/localtime -> /data/config/19-timezone/config
inkbox:/# ls -shal /data/config/19-timezone/config
0 lrwxrwxrwx 1 root root 36 Mar 11 14:52 /data/config/19-timezone/config -> /usr/share/zoneinfo/America/New_York
inkbox:/# date
Fri Mar 11 14:53:59 EST 2022
inkbox:/#
It seems to work

inkbox:/# date
Fri Mar 11 14:53:30 EST 2022
inkbox:/# chroot /kobo
inkbox:/# date
Fri Mar 11 19:54:37 UTC 2022
inkbox:/# 



inkbox:/# ls usr/share/zoneinfo
ls: usr/share/zoneinfo: No such file or directory
inkbox:/# (edited)


[ ! -e "/kobo/opt/version" ] && touch /kobo/opt/version

[ ! -e "/kobo/usr/share/zoneinfo" ] && mkdir -p /kobo/usr/share/zoneinfo
[ ! -e "/kobo/etc/localtime" ] && touch /kobo/etc/localtime
mount --bind /usr/share/zoneinfo /kobo/usr/share/zoneinfo
mount --bind /etc/localtime /kobo/etc/localtime (edited)

[ ! -e "/kobo/bin/kobo_config.sh" ] && touch /kobo/bin/kobo_config.sh


/etc/init.d/inkbox_gui




























% sshfs root@192.168.0.1:/ /mnt/Partition
root@192.168.0.1's password:
read: Connection reset by peer
why sshfs is not working?







mount /dev/mmcblk0p3 /mnt
mksquashfs /mnt/rootfs/write /tmp/rootfs-write.sqsh
umount /mnt
ifsctl mnt rootfs rw
/usr/local/bin/wifi/connect_to_wifi.sh, /mnt/rootfs/write will contain a copy of this file that is modified
it's why it's called overlayfs



ifsctl mnt rootfs rw, it remounts the rootfs rw and all the writes are redirected to [p3]/rootfs/writetouch /test, a file named test will be at [p3]/rootfs/write/test




killall -q dhcpcd wpa_supplicant





/data/config/17-wifi_connection_information/usr/local/bin/wifi/connect_to_network.sh with those strings (edited)












if [ "${DEVICE}" == "n705" ] || [ "${DEVICE}" == "n905b" ] || [ "${DEVICE}" == "n905c" ] || [ "${DEVICE}" == "n613" ] || [ "${DEVICE}" == "n437" ]; then
wlarm_le down
fi



if [ "$(cat /sys/class/net/${WIFI_DEV}/operstate)" == "up" ]; then
echo "true" > /tmp/was_connected_to_wifi
fi (edited)rm -f it once you've read its contents (edited)/sys/class/net/${WIFI_DEV}/operstate); added it above
if [ "$(cat /tmp/was_connected_to_wifi)" == "true" ]; then
ifconfig "${WIFI_DEV}" up
insmod "${WIFI_MODULE}" 2> /dev/null
insmod "${SDIO_WIFI_PWR_MODULE}" 2> /dev/null
ESSID=`cat /data/config/17-wifi_connection_information/essid`
PASSPHRASE=`cat /data/config/17-wifi_connection_information/passphrase`
/usr/local/bin/wifi/connect_to_network.sh "${ESSID}" "${PASSPHRASE}"
rm -f /tmp/was_connected_to_wifi
fi
$(command) in place of backticks
and if grep -q "true" /tmp/was_connected_to_wifi





















inkbox:~# date
Fri Mar 11 20:58:26 UTC 2022
inkbox:~# chroot /kobo
inkbox:/# date
Fri Mar 11 15:58:29 EST 2022
inkbox:/#








/tmp/was_connected_to_wifi or /run/was_connected_to_wifi







sleep_standby's job
















hwclock --systohc









[FBInk] [refresh_kobo_mk7] MXCFB_SEND_UPDATE_V2: Operation not permitted!
[FBInk] [fbink_cls] Failed to refresh the screen!
now it started doing something like this EDIT: it happens only when KOBOX ( xorg ) is enabled
interesting, right? do you know why? (edited)

[FBInk] [refresh_kobo_mk7] MXCFB_SEND_UPDATE_V2: Operation not permitted!
[FBInk] [fbink_cls] Failed to refresh the screen!
now it started doing something like this EDIT: it happens only when KOBOX ( xorg ) is enabled
interesting, right? do you know why? (edited)















Event: time 1647034909.855898, type 1 (EV_KEY), code 59 (KEY_F1), value 0
Event: time 1647034909.855898, -------------- SYN_REPORT ------------










scp rootfs.squashfs root@192.168.0.1:/mnt/
now i know this isin't a good idea
busybox) without any arguments
then
busybox sync
busybox reboot (edited)







































/data/config/19-timezone/config
Use ln -sf


ln -sf /usr/share/zoneinfo/Poland /data/config/19-timezone/config





































































cp /etc/init.d/sleep_standby.sh /etc/init.d/wake_standby.sh /tmp
vi /tmp/sleep_standby.sh # Replace first line with '#!/bin/bash -x'
vi /tmp/wake_standby.sh # Replace first line with '#!/bin/bash -x'
mount --bind /tmp/sleep_standby.sh /etc/init.d/sleep_standby.sh
mount --bind /tmp/wake_standby.sh /etc/init.d/wake_standby.sh
killall sleep_standby.sh wake_standby.sh # If nothing found, try to find processes with `ps' and kill the PID related to those scripts
rc-service sleep_standby stop
rc-service wake_standby stop
rc-service sleep_standby start -d
Then redo the steps above and post terminal output. It's a truckload of info, so it will probably be useful for debugging.

















Subsystem sftp internal-sftp to /etc/ssh/sshd_config

Subsystem sftp internal-sftp to /etc/ssh/sshd_config 
















[ 5.614571] syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 80021c08 ntx_machine_poweroff
[ 5.625116] syscon-poweroff: probe of 20cc000.snvs:snvs-poweroff failed with error -16





















kobo:~# rmmod -f configfs libcomposite u_ether usb_f_ecm usb_f_ecm_subset usb_f_rndis g_ether
rmmod: ERROR: could not remove 'configfs': Resource temporarily unavailable
rmmod: ERROR: could not remove module configfs: Resource temporarily unavailable
rmmod: ERROR: could not remove 'libcomposite': Resource temporarily unavailable
rmmod: ERROR: could not remove module libcomposite: Resource temporarily unavailable
rmmod: ERROR: could not remove 'u_ether': Resource temporarily unavailable
rmmod: ERROR: could not remove module u_ether: Resource temporarily unavailable
rmmod: ERROR: could not remove 'usb_f_ecm': No such file or directory
rmmod: ERROR: could not remove module usb_f_ecm: No such file or directory
rmmod: ERROR: could not remove 'usb_f_ecm_subset': No such file or directory
rmmod: ERROR: could not remove module usb_f_ecm_subset: No such file or directory
rmmod: ERROR: could not remove 'usb_f_rndis': Resource temporarily unavailable
rmmod: ERROR: could not remove module usb_f_rndis: Resource temporarily unavailable
rmmod: ERROR: could not remove 'g_ether': Resource busy
rmmod: ERROR: could not remove module g_ether: Resource busy
kobo:~# 
lsmod?
kobo:~# lsmod
Module Size Used by
8189fs 1294344 0
sdio_wifi_pwr 593 0
g_ether 5247 -1
usb_f_rndis 16183 1 g_ether
u_ether 12152 2 usb_f_rndis,g_ether
libcomposite 44430 2 usb_f_rndis,g_ether
configfs 23581 3 usb_f_rndis,libcomposite
kobo:~# 


echo false > /boot/flags/USBNET_ENABLE
















echo "1" > /sys/power/state-extended disable the touch screen?





echo "1" > /sys/power/state-extended disable the touch screen? 















busybox) without any arguments
then
busybox sync
busybox reboot (edited)




kobo:~# cat /sys/kernel/debug/suspend_stats
success: 2
fail: 6
failed_freeze: 1
failed_prepare: 0
failed_suspend: 5
failed_suspend_late: 0
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_early: 0
failed_resume_noirq: 0
failures:
last_failed_dev: 228c000.epdc
228c000.epdc
last_failed_errno: -2
-2
last_failed_step: suspend
suspend
those fails are becouse i tryied to do something, but still hmm228c000.epdc


kobo:/sys# find . -name "wakeup"
./devices/platform/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-rtc-lp/power/wakeup
./devices/platform/soc/2000000.aips-bus/20c9000.usbphy/power/wakeup
./devices/platform/soc/2000000.aips-bus/2000000.spba-bus/2020000.serial/tty/ttymxc0/power/wakeup
./devices/platform/soc/2000000.aips-bus/20ca000.usbphy/power/wakeup
./devices/platform/soc/2100000.aips-bus/2184000.usb/power/wakeup
./devices/platform/soc/2100000.aips-bus/2184000.usb/ci_hdrc.0/power/wakeup
./devices/platform/soc/2100000.aips-bus/2194000.usdhc/power/wakeup
./devices/platform/soc/2100000.aips-bus/2190000.usdhc/power/wakeup
./devices/platform/soc/2100000.aips-bus/21ec000.serial/tty/ttymxc2/power/wakeup
./devices/platform/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0032/rtc_ricoh619/power/wakeup
./devices/platform/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0032/ricoh619-battery/power_supply/acpwr/power/wakeup
./devices/platform/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0032/ricoh619-battery/power_supply/mc13892_charger/power/wakeup
./devices/platform/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0032/ricoh619-battery/power_supply/mc13892_bat/power/wakeup
./devices/platform/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0032/ricoh619-battery/power_supply/usbpwr/power/wakeup
./devices/platform/gpio-keys/power/wakeup
its still waking up


/cpus/cpu@0 missing clock-frequency property
sy7636-pmic sy7636-pmic: request vcom gpio failed (-16)!
sy7636-pmic sy7636-pmic: request powerup gpio failed (-16)!
syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 80021934 ntx_machine_poweroff
PMU: ricoh61x_battery_probe : version is RICOH61x_BATTERY_VERSION: 2014.02.21 V3.1.0.0-Solution1 2015/02/09
==== calc_soc_by_voltageMethod E60U22 ====
imx6ul-pinctrl 2290000.iomuxc-snvs: pin MX6ULL_PAD_SNVS_TAMPER3 already requested by 21f8000.i2c; cannot claim for gpio-keys
imx6ul-pinctrl 2290000.iomuxc-snvs: pin-5 (gpio-keys) status -22
imx6ul-pinctrl 2290000.iomuxc-snvs: could not request pin 5 (MX6ULL_PAD_SNVS_TAMPER3) from group gpio_snvs_keys_grp on device 22900s
gpio-keys gpio-keys: Error applying setting, reverse things back
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidanc.
---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt fo.
imx_epdc_v2_fb 228c000.epdc: Cleared LUT complete for init update
/dev/sdcard in inkbox?


sudo env GITDIR="${PWD}" scripts/make_devicenodes.sh








eBR-1A # boot
switch to partitions #0, OK
mmc0 is current device
mmc read 0x80800000 0x14000 0x5000
MMC read: dev # 0, block # 81920, count 20480 ... 20480 blocks read: OK
Booting from mmc ...
mmc read 0x83000000 0x505 0x1
MMC read: dev # 0, block # 1285, count 1 ... 1 blocks read: OK
dtb size = 41589@83000000
mmc read 0x83000000 0x506 0x57
MMC read: dev # 0, block # 1286, count 87 ... 87 blocks read: OK
hwcfgp=8ffffe00,pcb=81,customer=9
ntx_gpio_get_value(404) : error parameter ! null ptr !
ESDin=0,UPGKey=-1,PWRKey=0,USBin=0x1,BootESD=0,MenuKey=0
mmc read 0x8ffffc00 0x37ff 0x1
MMC read: dev # 0, block # 14335, count 1 ... 1 blocks read: OK
mmc read 0x8ff71a00 0x3800 0x472
MMC read: dev # 0, block # 14336, count 1138 ... 1138 blocks read: OK
mmc read 0x8ff71800 0x405 0x1
MMC read: dev # 0, block # 1029, count 1 ... 1 blocks read: OK
[WARNING] Binaries load sequence should Lo->Hi !
mmc read 0x8ff71400 0x406 0x3
MMC read: dev # 0, block # 1030, count 3 ... 3 blocks read: OK
Kernel RAM visiable size=255M->255M
ntx_gpio_init():R [ERROR] GPIO group number error (0)!!
ntx_gpio_init():B [ERROR] GPIO group number error (0)!!
hwcfg rootfstype : 2
hwcfg partition type : 2,bootmode=0
ntx_prebootm : cmd=setenv bootargs ${bootargs} hwcfg_p=0x8ffffe00 hwcfg_sz=110 waveform_p=0x8ff71a00 waveform_sz=582529 ntxfw_p=0x8t
Kernel image @ 0x80800000 [ 0x000000 - 0x9b88d0 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300d274
Starting kernel ... (edited)

Linux inkbox 4.1.15 #1 SMP PREEMPT Sat Feb 19 21:21:19 CET 2022 armv7l GNU/Linux



sudo env GITDIR="${PWD}" scripts/make_devicenodes.sh 


ls initrd/n306/dev

cat kernel/config/config-n306 | grep CMD (edited)

ls initrd/n306/dev % ls -l initrd/n306/dev
razem 0
crw-r--r-- 1 root root 5, 1 03-26 11:51 console
crw-r--r-- 1 root root 1, 3 03-26 11:51 null
crw-r--r-- 1 root root 207, 16 03-26 11:51 ttymxc

cat kernel/config/config-n306 | grep CMD (edited)% cat kernel/config/config-n306| grep CMD
# CONFIG_BLK_CMDLINE_PARSER is not set
CONFIG_CMDLINE="console=ttymxc0,115200 rootwait rw no_console_suspend hwcfg_p=0x8ffffe00 hwcfg_sz=110 waveform_p=0x8ff71a00 waveform_sz=582529 ntxfw_p=0x8ff71400 ntxfw_sz=1034 mem=255M boot_port=1 rootfstype=ramfs root=/dev/ram0 rdinit=/sbin/init printk.time quiet"
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
# CONFIG_CMDLINE_EXTEND is not set
CONFIG_CMDLINE_FORCE=y
# CONFIG_BCMDHD is not set
CONFIG_FB_CMDLINE=y
11:52 szybet@ArchSzybet /mnt/HDD/Project/Public/kobo-nia-audio/inkbox/kernel
% 

% ls -l initrd/n306/dev
razem 0
crw-r--r-- 1 root root 5, 1 03-26 11:51 console
crw-r--r-- 1 root root 1, 3 03-26 11:51 null
crw-r--r-- 1 root root 207, 16 03-26 11:51 ttymxc 
env GITDIR="${PWD}" TOOLCHAINDIR="${PWD}/toolchain/arm-nickel-linux-gnueabihf/" THREADS=$(($(nproc)*2)) TARGET=arm-nickel-linux-gnueabihf scripts/build_kernel.sh n306 root
the command to write:
sudo dd if=zImage-root of=/dev/sdd bs=512 seek=81920

/home/build/inkbox a working symlink?


/home/build/inkbox a working symlink? 



dd if=inkbox_maybe_working.img of=kernel_inkbox_working count=10000000 skip=81920 iflag=skip_bytes,count_bytes
to get the working kernel from a working inkbox imagesudo dd if=kernel_inkbox_working of=/dev/sdd bs=512 seek=81920

83000000 booting from but we are writing to 81920































distrobox-create --image debian:latest
distrobox-enter debian-latest
install some packages:
sudo apt update
sudo apt upgrade
sudo apt install bc git build-essential u-boot-tools libncurses5-dev libncursesw5-dev
create the symlink:
sudo mkdir -p /home/build/inkbox/
sudo ln -s path_to_kernel_repo /home/build/inkbox/kernel
thats it, now cpp magic won't waste your time (edited)



kobo:~# cat /sys/kernel/debug/wakeup_sources
name active_count event_count wakeup_count expire_count active_since total_time max_time last_change prevent_suspend_time
gpio-keys 0 0 0 0 0 0 0 5957 0
mc13892_charger 1 1 0 0 0 8 8 5701 0
usbpwr 1 1 0 0 0 7 7 5700 0
acpwr 1 1 0 0 0 5 5 5698 0
mc13892_bat 14 14 0 0 0 500 188 561099 0
20cc000.snvs:snvs-rtc-lp 0 0 0 0 0 0 0 5603 0
alarmtimer 0 0 0 0 0 0 0 4996 0
rtc_ricoh619 0
i disabled them all:
kobo:~# cat /sys/kernel/debug/wakeup_sources
name active_count event_count wakeup_count expire_count active_since total_time max_time last_change prevent_suspend_time
alarmtimer 0 0 0 0 0 0 0 4996
but its still waking up

kobo:~# ls /sys/power/
pm_async pm_print_times state wake_lock wakeup_count
pm_freeze_timeout pm_test state-extended wake_unlock
kobo:~# `



























/sys/devices/platform, here's it's too small to read

/sys/bus/i2c/drivers/elan-touch/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-0015kobo:/sys/bus/i2c/drivers/elan-touch# echo 0-0015 > unbind
kobo:/sys/bus/i2c/drivers/elan-touch# echo 0-0015 > bind
ash: write error: No such device
this just cant be easy :C





kobo:/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0# ls
0-0015 0-0062 delete_device name of_node subsystem
0-0036 0-0068 i2c-dev new_device power uevent
but how to use it


kobo:/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0# ls
0-0015 0-0062 delete_device name of_node subsystem
0-0036 0-0068 i2c-dev new_device power uevent
but how to use it 








kobo:/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0# echo 0x15 > delete_device
ash: write error: No such file or directory






arch/arm/boot/dts/imx6ull-ntx.dtsi

arch/arm/boot/dts/imx6ull-ntx-ddr3.dts (edited)


























Building modules, stage 2.
MODPOST 28 modules
ERROR: "gSleep_Mode_Suspend" [drivers/input/touchscreen/elan_touch_i2c.ko] undefined!
ERROR: "gIsCustomerUi" [drivers/input/touchscreen/elan_touch_i2c.ko] undefined!
ERROR: "gptHWCFG" [drivers/input/touchscreen/elan_touch_i2c.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:90: __modpost] Error 1
make: *** [Makefile:1103: modules] Error 2
[szybet@debian-latest linux-4.1.15-n306]$ 
#include "../../../arch/arm/mach-imx/ntx_hwconfig.h"
extern volatile NTX_HWCONFIG *gptHWCFG; weirdkernel/kernel/linux-4.1.15-n306/drivers/input/touchscreen/elan_touch_i2c.c:
line 768:
extern int gSleep_Mode_Suspend;
line 50
extern int gIsCustomerUi;
line 27 ( this one is the weirdiest )
#include "../../../arch/arm/mach-imx/ntx_hwconfig.h"
extern volatile NTX_HWCONFIG *gptHWCFG;







udevadm test --action="remove" /devices/platform/ntx_event0/input/inputelan* are many thing related to wakeup, i dont really understand them


[ 250.760770] Freezing of tasks failed after 20.008 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 250.769848] udevd D 8056fa00 0 814 1 0x00000001
[ 250.769897] [<8056fa00>] (__schedule) from [<8056fd8c>] (schedule+0x40/0x98)
[ 250.769917] [<8056fd8c>] (schedule) from [<801bcfdc>] (__fuse_request_send+0x13c/0x2c8)
[ 250.769938] [<801bcfdc>] (__fuse_request_send) from [<801bfe08>] (fuse_simple_request+0xc8/0x1dc)
[ 250.769958] [<801bfe08>] (fuse_simple_request) from [<801c2208>] (fuse_lookup_name+0xb8/0x16c)
[ 250.769975] [<801c2208>] (fuse_lookup_name) from [<801c22f4>] (fuse_lookup+0x38/0xdc)
[ 250.769995] [<801c22f4>] (fuse_lookup) from [<800ef928>] (lookup_real+0x20/0x4c)
[ 250.770015] [<800ef928>] (lookup_real) from [<800f082c>] (__lookup_hash+0x34/0x3c)
[ 250.770033] [<800f082c>] (__lookup_hash) from [<800f086c>] (lookup_slow+0x38/0xa4)
[ 250.770050] [<800f086c>] (lookup_slow) from [<800f42e0>] (path_lookupat+0x5b8/0x704)
[ 250.770066] [<800f42e0>] (path_lookupat) from [<800f4448>] (filename_lookup+0x1c/0x64)
[ 250.770080] [<800f4448>] (filename_lookup) from [<800f5840>] (user_path_at_empty+0x54/0x7c)
[ 250.770096] [<800f5840>] (user_path_at_empty) from [<800f587c>] (user_path_at+0x14/0x1c)
[ 250.770112] [<800f587c>] (user_path_at) from [<800ebb08>] (vfs_fstatat+0x44/0x98)
[ 250.770131] [<800ebb08>] (vfs_fstatat) from [<800ec1e0>] (SyS_stat64+0x14/0x30)
[ 250.770151] [<800ec1e0>] (SyS_stat64) from [<8000f440>] (ret_fast_syscall+0x0/0x3c)
[ 250.770181]
[ 250.770190] Restarting tasks ... done. and:
kobo:~# [ 250.760770] Freezing of tasks failed after 20.008 seconds (1 tasks refusing to freeze, wq_busy=0):











[p1]/modules folder, I don't know
































./wake_standby.sh: line 14: echo: write error: Operation not permitted
[FBInk] Couldn't find a Kobo version tag (onboard unmounted or not running on a Kobo?)!
[FBInk] Detected a Kobo Nia (382 => Luna @ Mark 7)
[FBInk] Enabled Kobo Mark 7 quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 212 dpi
[FBInk] Variable fb info: 758x1024, 16bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 1536 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 47 cols, Page size: 64 rows
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
[FBInk] Couldn't find a Kobo version tag (onboard unmounted or not running on a Kobo?)!
[FBInk] Detected a Kobo Nia (382 => Luna @ Mark 7)
[FBInk] Enabled Kobo Mark 7 quirks
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 212 dpi
[FBInk] Variable fb info: 758x1024, 16bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 1536 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 47 cols, Page size: 64 rows
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
Displaying image '/tmp/dump.png' @ column 0 + 0px, row 0 + 0px (scaling: 0x0, H align: 0, V align: 0, inverted: N, flattened: N, waveform: AUTO, HW dithering: PASSTHROUGH, SW dithered: N, nightmode: N, skip refresh: N)
and at line 14:
echo "mem" > /sys/power/state
[ 2341.748944] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 2341.750868] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 2341.752192] PM: Entering mem sleep
[ 2341.755135] [evdev_check_event-1232] event1 head D4, tail 3A
[ 2341.755169] dpm_run_callback(): input_dev_suspend+0x0/0xac returns -1
[ 2341.761767] PM: Device input1 failed to suspend: error -1
[ 2341.767180] PM: Some devices failed to suspend, or early wake event detected
[ 2341.847891] PM: resume of devices complete after 73.565 msecs
[ 2341.849635] PM: resume devices took 0.080 seconds
[ 2341.849653] PM: Finishing wakeup































chroot /kobo /usr/bin/fbgrab "/external_root/tmp/dump.png" this command does nothing?...











/opt/bin/fbink/fbink -k -f -q
/opt/bin/fbink/fbink -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=20 "Sleeping" -m -M -q
can i put this just before going to sleep?
"${VAR}" for var expansion (double quote unless you know it will be an int)
"$(command)" for invoking command in a var

/opt/bin/fbink/fbink -k -f -q
/opt/bin/fbink/fbink -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=20 "Sleeping" -m -M -q
can i put this just before going to sleep? 

"${VAR}" for var expansion (double quote unless you know it will be an int)
"$(command)" for invoking command in a var 






Wait for a particular event on a file or set of files.




fbink -q -p -m -y 30 -S 3 -B WHITE -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=10 "don't touch the screen" the place where to spawn the text using those fonts? i tryied with size=10,bottom=10 etc but nothing worked

fbink -q -p -m -y 30 -S 3 -B WHITE -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=10 "don't touch the screen" the place where to spawn the text using those fonts? i tryied with size=10,bottom=10 etc but nothing worked 


restore-*.sh ones are probably the most interesting




















#!/bin/bash
# /tmp/sleep_error stores errors when going to sleep. For kobo nia, if missing permission error will show up it will try again
DEVICE=$(cat /opt/inkbox_device)
# Race condition; going to sleep
echo "false" > /tmp/sleep_standby # Idk if its needed
/opt/bin/fbink/fbink -k -f -q
/opt/bin/fbink/fbink -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=20 "Sleeping" -m -M -q
echo "sleeping" > /tmp/sleep_status
go_sleep() {
echo "read file"
cat /tmp/sleep_error
rm -f /tmp/sleep_error 2>/dev/null
sleep 8
sync
echo "going to sleep"
echo "1" > /sys/power/state-extended
sync
sleep 2
echo "mem" > /sys/power/state 2>/tmp/sleep_error
sleep 2
}
go_sleep
if [ "${DEVICE}" == "n306" ]; then
# Separate if to avoid writing many times to the e-ink. idk about the syntax / look of the code here
if grep -q "Operation not permitted" /tmp/sleep_error; then
### TO DO get the good position of it
/opt/bin/fbink/fbink -m -q -B WHITE -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=18,top=800,bottom=0,left=0,right=0 "don't touch the screen"
/opt/bin/fbink/fbink -m -q -B WHITE -t regular=/etc/init.d/splash.d/fonts/resources/inter-b.ttf,size=14,top=870,bottom=0,left=0,right=0 "Nia can't go to sleep if it's touched"
fi
while grep -q "Operation not permitted" /tmp/sleep_error; do
go_sleep
done
fi
/etc/init.d/suspend_scripts/after_sleep.sh


















/tmp/sleep_mode?

/tmp/sleep_standby?

kill -CONT $(pidof inkbox-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof oobe-inkbox-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof calculator-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof scribble 2>/dev/null) 2>/dev/null
kill -CONT $(pidof lightmaps 2>/dev/null) 2>/dev/null
kill -CONT $(pidof qreversi-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof 2048-bin 2>/dev/null) 2>/dev/null
sleep 2
kill -STOP $(pidof inkbox-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof oobe-inkbox-bin 2>/dev/null) 2>/dev/null
kill -9 $(pidof lockscreen-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof calculator-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof scribble 2>/dev/null) 2>/dev/null
kill -STOP $(pidof lightmaps 2>/dev/null) 2>/dev/null
kill -STOP $(pidof qreversi-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof 2048-bin 2>/dev/null) 2>/dev/null
to make it go to sleep after the error with touch



kill -CONT $(pidof inkbox-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof oobe-inkbox-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof calculator-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof scribble 2>/dev/null) 2>/dev/null
kill -CONT $(pidof lightmaps 2>/dev/null) 2>/dev/null
kill -CONT $(pidof qreversi-bin 2>/dev/null) 2>/dev/null
kill -CONT $(pidof 2048-bin 2>/dev/null) 2>/dev/null
sleep 2
kill -STOP $(pidof inkbox-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof oobe-inkbox-bin 2>/dev/null) 2>/dev/null
kill -9 $(pidof lockscreen-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof calculator-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof scribble 2>/dev/null) 2>/dev/null
kill -STOP $(pidof lightmaps 2>/dev/null) 2>/dev/null
kill -STOP $(pidof qreversi-bin 2>/dev/null) 2>/dev/null
kill -STOP $(pidof 2048-bin 2>/dev/null) 2>/dev/null
to make it go to sleep after the error with touch while and now it goes to sleep, and does not loop itself


















fbink without arguments will print the full help
























































































BOOT_USB_DEBUG

diff --git a/kernel/linux-3.0.35-n437/drivers/input/touchscreen/zforce_i2c.c b/kernel/linux-3.0.35-n437/drivers/input/touchscreen/zforce_i2c.c
index a562702d9f..583126728c 100755
--- a/kernel/linux-3.0.35-n437/drivers/input/touchscreen/zforce_i2c.c
+++ b/kernel/linux-3.0.35-n437/drivers/input/touchscreen/zforce_i2c.c
@@ -712,28 +712,6 @@ static int zForce_ir_touch_suspend(struct platform_device *pdev, pm_message_t st
static int zForce_ir_touch_resume(struct platform_device *pdev)
{
- if (gSleep_Mode_Suspend) {
- if ( !(41==gptHWCFG->m_val.bPCB && 3!=gptHWCFG->m_val.bUIConfig) ) { //auto active while power on zforce controller
- if(8==gptHWCFG->m_val.bTouchCtrl || 11==gptHWCFG->m_val.bTouchCtrl) {
- i2c_master_send(zForce_ir_touch_data.client, cmd_Active_v2, sizeof(cmd_Active_v2));
- }else{
- i2c_master_send(zForce_ir_touch_data.client, cmd_Active, sizeof(cmd_Active));
- }
- }
- if( custom_touchSizeLimit_set ) {
- printk("command setTouchSizeLimits");
- i2c_master_send(zForce_ir_touch_data.client, cmd_SetTouchSizeLimits, sizeof(cmd_SetTouchSizeLimits));
- msleep(5);
- }
-// enable_irq_wake(zForce_ir_touch_data.client->irq);
- request_irq(zForce_ir_touch_data.client->irq, zForce_ir_touch_ts_interrupt, IRQF_TRIGGER_FALLING, ZFORCE_TS_NAME, ZFORCE_TS_NAME);
- }
- else
- disable_irq_wake(zForce_ir_touch_data.client->irq);
- if (!zForce_ir_touch_detect_int_level ()) {
- zForce_ir_touch_ts_triggered ();
- }
-
return 0;
}


build_u-boot.sh script in the kernel repo; building U-Boot is now much easierenv TOOLCHAINDIR=/home/build/inkbox/kernel/toolchain/arm-nickel-linux-gnueabihf TARGET=arm-nickel-linux-gnueabihf THREADS=16 scripts/build_u-boot.sh n306

fdisk -l your SD card?


fdisk -l your SD card? kobo:~# fdisk -l
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors
486192 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 24,0,1 38,63,32 49152 79871 30720 15.0M 83 Linux
/dev/mmcblk0p2 51,0,1 550,63,32 104448 1128447 1024000 500M 83 Linux
/dev/mmcblk0p3 551,0,1 678,63,32 1128448 1390591 262144 128M 83 Linux
/dev/mmcblk0p4 679,0,1 857,31,32 1390592 31116287 29725696 14.1G 83 Linux
kobo:~#
why do you need itfuse-overlayfs 14G 2.7G 11G 20% /kobo
so i have 11G available for books, its 3 more than on nickel with the same sd cardkobo:/opt/config/08-recent_books# fixes the issue. Its needs a whole redesign, but i just say that its completly broken

kobo:~# fdisk -l
Disk /dev/mmcblk0: 15 GB, 15931539456 bytes, 31116288 sectors
486192 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 24,0,1 38,63,32 49152 79871 30720 15.0M 83 Linux
/dev/mmcblk0p2 51,0,1 550,63,32 104448 1128447 1024000 500M 83 Linux
/dev/mmcblk0p3 551,0,1 678,63,32 1128448 1390591 262144 128M 83 Linux
/dev/mmcblk0p4 679,0,1 857,31,32 1390592 31116287 29725696 14.1G 83 Linux
kobo:~#
why do you need it dd if=/dev/mmcblk0 bs=512 count=49151 of=n306.bin



























































applying settings and 10s wait for the gui












dd if=/dev/mmcblk0 bs=512 count=49151 of=n306.bin 





















































































kobo:/kobo/sys/devices/platform/soc/2100000.aips-bus/21f8000.i2c/i2c-3/3-0032/ricoh619-battery/power_supply/mc13892_batcapacity status type
current_now subsystem uevent
device technology voltage_min_design
health temp voltage_now
power time_to_empty_now
present time_to_full_nowhealth says goodPOWER_SUPPLY_NAME=mc13892_bat
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=4136700
POWER_SUPPLY_CURRENT_NOW=895
POWER_SUPPLY_CAPACITY=93
POWER_SUPPLY_TEMP=340
POWER_SUPPLY_TIME_TO_EMPTY_NOW=30420
POWER_SUPPLY_TIME_TO_FULL_NOW=3932100
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3350






































































env GITDIR="${PWD}" TOOLCHAINDIR="${PWD}/toolchain/arm-nickel-linux-gnueabihf/" THREADS=$(($(nproc)*2)) TARGET=arm-nickel-linux-gnueabihf scripts/build_kernel.sh n306 root
the command to write:
sudo dd if=zImage-root of=/dev/sdd bs=512 seek=81920 



































restart update_inkbox
cp: cannot create regular file '/kobo/mnt/onboard/.adds/qt-linux-5.15.2-kobo/lib/libzip.so': Read-only file system
0 files (152.0 KiB) copied in 0.1 seconds ( 0.0 KiB/s).

cp: cannot create regular file '/kobo/mnt/onboard/.adds/qt-linux-5.15.2-kobo/lib/libzip.so': Read-only file system
0 files (152.0 KiB) copied in 0.1 seconds ( 0.0 KiB/s). 

kobo:(unknown)# service update_inkbox restart
* Checking for available updates ...
Update skipped or no update available, aborting ... [ ok ]
ash: getcwd: No such file or directory
kobo:(unknown)# 












[app-name_data]





























for name in /sys/class/regulator/regulator.* ; do echo `cat $name/name` `cat $name/microvolts` `cat $name/state` ; done (edited)
for name in /sys/class/regulator/regulator.* ; do echo $(cat $name/name) $(cat $name/microvolts) $(cat $name/state) ; done (edited)

obo:~# for name in /sys/class/regulator/regulator.* ; do echo `cat $name/name` `cat $n
ame/microvolts` `cat $name/state` ; done
cat: /sys/class/regulator/regulator.0/microvolts: No such file or directory
cat: /sys/class/regulator/regulator.0/state: No such file or directory
regulator-dummy
vdd3p0 3200000 enabled
RICOH619_DC5 1800000 enabled
RICOH619_LDO1 900000 disabled
RICOH619_LDO2 900000 enabled
RICOH619_LDO3 900000 disabled
RICOH619_LDO4 900000 disabled
RICOH619_LDO5 600000 enabled
RICOH619_LDO6 600000 enabled
RICOH619_LDO7 900000 enabled
RICOH619_LDO8 1800000 enabled
RICOH619_LDO9 900000 disabled
cpu 1250000 enabled
RICOH619_LDO10 900000 disabled
RICOH619_LDORTC1 1700000 enabled
RICOH619_LDORTC2 900000 disabled
cat: /sys/class/regulator/regulator.23/microvolts: No such file or directory
DISPLAY_SY7636 disabled
cat: /sys/class/regulator/regulator.24/microvolts: No such file or directory
VCOM_SY7636 disabled
cat: /sys/class/regulator/regulator.25/microvolts: No such file or directory
V3P3_SY7636 disabled
cat: /sys/class/regulator/regulator.26/state: No such file or directory
TMST_SY7636 0
vddsoc 1250000 enabled
cat: /sys/class/regulator/regulator.4/state: No such file or directory
vref-3v3 3300000
cat: /sys/class/regulator/regulator.5/state: No such file or directory
SD1_SPWR 3000000
RICOH619_DC1 1400000 enabled
RICOH619_DC2 600000 enabled
RICOH619_DC3 600000 enabled
RICOH619_DC4 1200000 enabled
kobo:~# 















































obo:~# for name in /sys/class/regulator/regulator.* ; do echo `cat $name/name` `cat $n
ame/microvolts` `cat $name/state` ; done
cat: /sys/class/regulator/regulator.0/microvolts: No such file or directory
cat: /sys/class/regulator/regulator.0/state: No such file or directory
regulator-dummy
vdd3p0 3200000 enabled
RICOH619_DC5 1800000 enabled
RICOH619_LDO1 900000 disabled
RICOH619_LDO2 900000 enabled
RICOH619_LDO3 900000 disabled
RICOH619_LDO4 900000 disabled
RICOH619_LDO5 600000 enabled
RICOH619_LDO6 600000 enabled
RICOH619_LDO7 900000 enabled
RICOH619_LDO8 1800000 enabled
RICOH619_LDO9 900000 disabled
cpu 1250000 enabled
RICOH619_LDO10 900000 disabled
RICOH619_LDORTC1 1700000 enabled
RICOH619_LDORTC2 900000 disabled
cat: /sys/class/regulator/regulator.23/microvolts: No such file or directory
DISPLAY_SY7636 disabled
cat: /sys/class/regulator/regulator.24/microvolts: No such file or directory
VCOM_SY7636 disabled
cat: /sys/class/regulator/regulator.25/microvolts: No such file or directory
V3P3_SY7636 disabled
cat: /sys/class/regulator/regulator.26/state: No such file or directory
TMST_SY7636 0
vddsoc 1250000 enabled
cat: /sys/class/regulator/regulator.4/state: No such file or directory
vref-3v3 3300000
cat: /sys/class/regulator/regulator.5/state: No such file or directory
SD1_SPWR 3000000
RICOH619_DC1 1400000 enabled
RICOH619_DC2 600000 enabled
RICOH619_DC3 600000 enabled
RICOH619_DC4 1200000 enabled
kobo:~# 

kobo:/sys/class/power_supply# cat /sys/class/power_supply/*/current_now
845
kobo:/sys/class/power_supply#
its always 845, even if i turn wifi on








#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
extern void ntx_wifi_power_ctrl (int isWifiEnable);
static int __init sdio_wifi_pwr_init(void)
{
ntx_wifi_power_ctrl(1);
return 0;
}
module_init(sdio_wifi_pwr_init);
static void __exit sdio_wifi_pwr_exit(void)
{
ntx_wifi_power_ctrl(0);
}
module_exit(sdio_wifi_pwr_exit);
MODULE_DESCRIPTION("sdio wifi power control driver");
MODULE_AUTHOR("Netronix");
MODULE_LICENSE("GPL");



#define CM_WIFI_CTRL 208

#define CM_BLUETOOTH_PWR 126 because same chip


#define CM_BLUETOOTH_PWR 126 because same chip 






























&usdhc3 {
pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
pinctrl-0 = <&pinctrl_usdhc3>;
pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
pinctrl-3 = <&pinctrl_usdhc3_sleep>;
vmmc-supply = <®_wifi>;
mmc-pwrseq = <&wifi_pwrseq>;
cap-power-off-card;
non-removable;
status = "okay";
Here i am specifying the power supply for the wifi card. Then the host controller driver will turn off regulator when the card is not used. If no driver for the card is loaded, it is considered not used. A well behaved driver (!= rtl8189fs out-of-mainline-tree driver) will also tell when the card is not used, so the host controller will know what to do
























































